package com.luobo.common;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取配置类
 */
@Data
@Component
@ConfigurationProperties(prefix = "systems.config")
public class SystemConfig {
//    @ApiModelProperty("短信APPId")
	@Value("${systems.config.smsappid:1400239314}")
	private Integer smsappid;
//    @ApiModelProperty("短信appkey")
	@Value("${systems.config.smsappkey:51782f27e5f0b7a52d658215e2656e01}")
	private String smsappkey;
//    @ApiModelProperty("短信模板ID")
	@Value("${systems.config.templateId:419988}")
	private Integer templateId;
//    @ApiModelProperty("手机号码正则表达式")
	@Value("${systems.config.phonenumberreg:^1[3|4|5|7|8][0-9]\\d{4,8}$}")
	private String phonenumberreg;
//    @ApiModelProperty("手机号码正则表达式")
	@Value("${systems.config.emailreg:^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$}")
	private String emailreg;
//    @ApiModelProperty("短信验证码有效时长")
	@Value("${systems.config.smsexpiretime:10}")
	private Integer smsexpiretime;
//    @ApiModelProperty("小说下载路径")
	@Value("${systems.config.bookpath:/opt/luobo/}")
	private String bookPath;
//    @ApiModelProperty("验证码10分钟内发送次数限制")
	@Value("${systems.config.authcodecount:3}")
	private Integer authcodecount;
	// 邮件通知消息队列
	@Value("${systems.config.emailQueue:emailQueue}")
	private String emailQueue;
	

}
